package com.live.stamp.web.message.baseDataService;

import com.live.stamp.web.message.model.TMessage;
import com.live.stamp.web.message.vo.TMessageVo;
import org.springframework.boot.container.core.common.BusinessException;

import java.util.List;

/**
 * @author cwd E-mail: wendong.cao@jsxfedu.com
 * @version 1
 * @date 2018/5/12 15:52
 */
public interface MessageBaseService {

    /**
     * 添加消息
     * @param tMessage
     * @throws BusinessException
     */
    void addMessage(TMessage tMessage) throws BusinessException;

    /**
     * 消息列表
     * @param tMessage
     * @return
     * @throws BusinessException
     */
    List<TMessage> messageList(TMessage tMessage) throws BusinessException;

    List<TMessageVo> commonMessageList(TMessage tMessage) throws BusinessException;

    /**
     * 获取消息内容
     * @param tMessage
     * @return
     * @throws BusinessException
     */
    TMessage getOneMessage(TMessage tMessage) throws BusinessException;

    /**
     * 更新消息
     * @param tMessage
     * @throws BusinessException
     */
    void updateMessage(TMessage tMessage) throws BusinessException;

    /**
     * 更新用户的新的关注消息为已读状态
     * @param userId
     * @throws BusinessException
     */
    void updateAttenMessageRead(String userId) throws BusinessException;
}
